<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <select id="province">
      <option value="">请选择</option>
      <option value="1">河南</option>
      <option value="2" id="jxs">江西</option>
      <option value="3">黑龙江</option>
      <option value="4">广西</option>
      <option value="5" selected>贵州</option>
      <option value="6">台湾</option>
    </select>
    <button id="btn">选中老表</button>
    <script>
      var selectEle = document.getElementById('province')
      var btnEle = document.getElementById('btn')
      // 绑定切换事件
      selectEle.addEventListener('change', function () {
        console.log(this.value)
      })

      btnEle.addEventListener('click', function () {
        // 方式1：
        // selectEle[2].selected = true
        // 方式2：通过下标让option默认选中
        // selectEle.selectedIndex = 2
        var jsxEle = document.getElementById('jxs')
        jsxEle.selected = true
      })
    </script>
  </body>
</html>
